﻿using Microsoft.AspNetCore.Components;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HuaweiBarcodeScan.Services
{
    public partial class HuaweiScanService
    {

        public partial Task StartScan(EventCallback<string> OnScanResult)
        {
            var activity = Platform.CurrentActivity as MainActivity;
            if (activity != null)
            {
                // 使用activity实例
                activity.LaunchScanActivity(OnScanResult);
            }
            return Task.CompletedTask;
        }
    }
}
